<div id="background">
    <form class="layui-form  layui-anim layui-anim-upbit" *ngIf="user">
        <div class="layui-row">
            <div class="layui-col-md6 layui-col-md-offset4">
                <div class="layui-form-item">
                    <div class="layui-form-inline">
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <img src="./assets/image/2.png" />
                            </div>
                            <div class="layui-col-md6">
                                <label> {{user.id}}</label>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" required lay-verify="required" placeholder="请输用户名" autocomplete="off" class="layui-input" [(ngModel)]="user.username">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">密码</label>
                    <div class="layui-input-inline">
                        <input type="text" name="pasword" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input" [(ngModel)]="user.password">
                    </div>
                </div>

                <div class="layui-form-item" *ngIf="user.id!=1">
                    <label class="layui-form-label">房间号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="roomid" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" [(ngModel)]="user.room">
                    </div>
                </div>


                <div class="layui-form-item">
                    <div class="layui-form-inline">
                        <label class="layui-form-label">姓名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" [(ngModel)]="user.name">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" id="buttons">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo" (click)="updateUser()">确定修改</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </div>
        </div>

    </form>
</div>